<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../../../../../build/css/onsenui.css"/>
    <link rel="stylesheet" href="../../../../../build/css/onsen-css-components.css"/>

    <script src="../../../../../build/js/onsenui.js"></script>
    <script src="../../../node_modules/angular/angular.js"></script>
    <script src="../../../../../build/js/angular-onsenui.js"></script>
    <script>
      ons.bootstrap();

      ons.ready(function() {
        ons.createDialog('dialog.html').then(function(dlg) {
          dlg.show();
        });

        setTimeout(function() {
          var el = document.querySelector("#test");

          if (el && el.innerHTML === 'Hello, world!') {
            alert('OK');
          }
          else {
            alert('NG');
          }
        }, 100);
      });
    </script>

    <style>

    </style>
  </head>
  <body>

    <ons-navigator var="navi">
      <ons-toolbar>
        <div class="center">Dialog test</div>
      </ons-toolbar>
    </ons-navigator>

    <script type="text/ons-template" id="dialog.html">
      <ons-dialog cancelable>
        <ons-scroller>
          <p id="test">Hello, world!</p>
        </ons-scroller>
      </ons-dialog>
    </script>

  </body>
</html>
